package com.yf.monitor;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @ClassName ApiMonitorProperties
 * @Description 配置属性类
 * @Author Scott.Yin
 * @Date 2025/8/21 17:23
 * @Version 1.0
 **/
@ConfigurationProperties(prefix = "api.monitor")
public class ApiMonitorProperties {
    private boolean enabled = true;
    private double globalSampleRate = 1.0;
    private String tdengineUrl = "jdbc:TAOS://localhost:6030/apimonitor";
    private String tdengineUsername = "root";
    private String tdenginePassword = "taosdata";
    private String rocketmqNameServer = "localhost:9876";
    private String rocketmqTopic = "API_RECORD_TOPIC";
    private String rocketmqProducerGroup = "api_monitor_producer_group";
    private String rocketmqConsumerGroup = "api_monitor_consumer_group";

    // Getters and Setters
    public boolean isEnabled() {
        return enabled;
    }

    public void setEnabled(boolean enabled) {
        this.enabled = enabled;
    }

    public double getGlobalSampleRate() {
        return globalSampleRate;
    }

    public void setGlobalSampleRate(double globalSampleRate) {
        this.globalSampleRate = globalSampleRate;
    }

    public String getTdengineUrl() {
        return tdengineUrl;
    }

    public void setTdengineUrl(String tdengineUrl) {
        this.tdengineUrl = tdengineUrl;
    }

    public String getTdengineUsername() {
        return tdengineUsername;
    }

    public void setTdengineUsername(String tdengineUsername) {
        this.tdengineUsername = tdengineUsername;
    }

    public String getTdenginePassword() {
        return tdenginePassword;
    }

    public void setTdenginePassword(String tdenginePassword) {
        this.tdenginePassword = tdenginePassword;
    }

    public String getRocketmqNameServer() {
        return rocketmqNameServer;
    }

    public void setRocketmqNameServer(String rocketmqNameServer) {
        this.rocketmqNameServer = rocketmqNameServer;
    }

    public String getRocketmqTopic() {
        return rocketmqTopic;
    }

    public void setRocketmqTopic(String rocketmqTopic) {
        this.rocketmqTopic = rocketmqTopic;
    }

    public String getRocketmqProducerGroup() {
        return rocketmqProducerGroup;
    }

    public void setRocketmqProducerGroup(String rocketmqProducerGroup) {
        this.rocketmqProducerGroup = rocketmqProducerGroup;
    }

    public String getRocketmqConsumerGroup() {
        return rocketmqConsumerGroup;
    }

    public void setRocketmqConsumerGroup(String rocketmqConsumerGroup) {
        this.rocketmqConsumerGroup = rocketmqConsumerGroup;
    }
}
